package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.annotation.Excel;
import com.ly.common.core.domain.BaseVo;

import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 客户表
 * </p>
 *
 * @author WuZH
 * @since 2024-05-14
 */
@Getter
@Setter
@TableName ( "erp_customer_info" )
@ApiModel ( value = "客户表", description = "客户表" )
public class CustomerEntity extends BaseVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty ( "id" )
    @TableId ( value = "id", type = IdType.INPUT )
    private String id;

    @ApiModelProperty ( "客户编码" )
    @TableField ( "customer_code" )
    private String customerCode;

    @ApiModelProperty ( "组织id" )
    @TableField ( "dept_id" )
    private String deptId;

    @ApiModelProperty ( "简称" )
    @TableField ( "abbreviation" )
    private String abbreviation;


    @ApiModelProperty ( "客户名称" )
    @TableField ( "customer_name" )
    private String customerName;

    @ApiModelProperty ( "客户属性" )
    @TableField ( "customer_attribute_id" )
    private String customerAttributeId;

    @ApiModelProperty ( "上级公司" )
    @TableField ( "company_id" )
    private String companyId;

    @ApiModelProperty ( "联系电话，判重" )
    @TableField ( "tel_phone" )
    private String telPhone;

    @ApiModelProperty ( "信用度，1：良好；2：一般；3：较差" )
    @TableField ( "credit_rating" )
    private Integer creditRating;

    @ApiModelProperty ( "省Id" )
    @TableField ( "provinces_id" )
    private String provincesId;

    @ApiModelProperty ( "市Id" )
    @TableField ( "city_id" )
    private String cityId;

    @ApiModelProperty ( "区县Id" )
    @TableField ( "county_id" )
    private String countyId;

    @ApiModelProperty ( "详细地址" )
    @TableField ( "address" )
    private String address;

    /**
     * 邮政编码
     */
    @Excel ( name = "邮政编码" )
    @ApiModelProperty ( "邮政编码" )
    @TableField ( "post_code" )
    private String postCode;

    /**
     * 公司网址
     */
    @Excel ( name = "公司网址" )
    @ApiModelProperty ( "公司网址" )
    @TableField ( "company_url" )
    private String companyUrl;

    /**
     * 传真
     */
    @Excel ( name = "传真" )
    @ApiModelProperty ( "传真" )
    @TableField ( "facsimile" )
    private String facsimile;

    /**
     * 公司类别
     */
    @Excel ( name = "公司类别" )
    @ApiModelProperty ( "公司类别" )
    @TableField ( "company_type" )
    private String companyType;

    /**
     * 公司性质
     */
    @Excel ( name = "公司性质" )
    @ApiModelProperty ( "公司性质" )
    @TableField ( "company_nature" )
    private String companyNature;

    /**
     * 公司规模
     */
    @Excel ( name = "公司规模" )
    @ApiModelProperty ( "公司规模" )
    @TableField ( "company_size" )
    private String companySize;

    /**
     * 对应供应商
     */
    @Excel ( name = "对应供应商" )
    @ApiModelProperty ( "对应供应商" )
    @TableField ( "counter_supplier" )
    private String counterSupplier;

    /**
     * 对应集团客户
     */
    @Excel ( name = "对应集团客户" )
    @ApiModelProperty ( "对应集团客户" )
    @TableField ( "counter_customer_id" )
    private String counterCustomerId;

    /**
     * 客户类别
     */
    @Excel ( name = "客户类别" )
    @ApiModelProperty ( "客户类别" )
    @TableField ( "customer_type" )
    private String customerType;

    /**
     * 客户分组
     */
    @Excel ( name = "客户分组" )
    @ApiModelProperty ( "客户分组" )
    @TableField ( "customer_group" )
    private String customerGroup;

    /**
     * 对应组织
     */
    @Excel ( name = "对应组织" )
    @ApiModelProperty ( "对应组织" )
    @TableField ( "counter_dept" )
    private String counterDept;

    /**
     * 法人代表
     */
    @Excel ( name = "法人代表" )
    @ApiModelProperty ( "法人代表" )
    @TableField ( "legal_representative" )
    private String legalRepresentative;

    /**
     * 注册资本
     */
    @Excel ( name = "注册资本" )
    @ApiModelProperty ( "注册资本" )
    @TableField ( "registered_capital" )
    private String registeredCapital;

    /**
     * 注册时间
     */
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    @Excel ( name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd" )
    @ApiModelProperty ( "注册时间" )
    @TableField ( "registered_time" )
    private Date registeredTime;

    /**
     * 行业
     */
    @Excel ( name = "行业" )
    @ApiModelProperty ( "行业" )
    @TableField ( "industry" )
    private String industry;

    /**
     * 注册地址
     */
    @Excel ( name = "注册地址" )
    @ApiModelProperty ( "注册地址" )
    @TableField ( "register_address" )
    private String registerAddress;

    /**
     * 开票抬头
     */
    @Excel ( name = "开票抬头" )
    @ApiModelProperty ( "开票抬头" )
    @TableField ( "invoice_header" )
    private String invoiceHeader;

    /**
     * 纳税登记号
     */
    @Excel ( name = "纳税登记号" )
    @ApiModelProperty ( "纳税登记号" )
    @TableField ( "tax_id" )
    private String taxId;

    /**
     * 开户银行
     */
    @Excel ( name = "开户银行" )
    @ApiModelProperty ( "开户银行" )
    @TableField ( "open_bank" )
    private String openBank;

    /**
     * 银行账号
     */
    @Excel ( name = "银行账号" )
    @ApiModelProperty ( "银行账号" )
    @TableField ( "bank_account" )
    private String bankAccount;

    /**
     * 开票电话
     */
    @Excel ( name = "开票电话" )
    @ApiModelProperty ( "开票电话" )
    @TableField ( "invoice_hotline" )
    private String invoiceHotline;

    /**
     * 开票地址
     */
    @Excel ( name = "开票地址" )
    @ApiModelProperty ( "开票地址" )
    @TableField ( "invoice_address" )
    private String invoiceAddress;

    @Excel ( name = "收票邮箱" )
    @ApiModelProperty ( "收票邮箱" )
    @TableField ( "invoice_email" )
    private String invoiceEmail;

    /**
     * 统一社会信用代码
     */
    @Excel ( name = "统一社会信用代码" )
    @ApiModelProperty ( "统一社会信用代码" )
    @TableField ( "unified_code" )
    private String unifiedCode;

    /**
     * 是否允许对接智慧订单
     */
    @Excel ( name = "是否允许对接智慧订单" )
    @ApiModelProperty ( "是否允许对接智慧订单" )
    @TableField ( "is_allow" )
    private String isAllow;

    @ApiModelProperty ( "备注" )
    @TableField ( "remarks" )
    private String remarks;

    @ApiModelProperty ( "主要负责人姓名" )
    @TableField ( "contacts_name" )
    private String contactsName;

    @ApiModelProperty ( "主要负责人职位" )
    @TableField ( "contacts_position" )
    private String contactsPosition;

    @ApiModelProperty ( "主要负责人手机" )
    @TableField ( "contacts_phone" )
    private String contactsPhone;

    @ApiModelProperty ( "主要负责人邮箱" )
    @TableField ( "contacts_email" )
    private String contactsEmail;

    @ApiModelProperty ( "主要负责人电话" )
    @TableField ( "contacts_tel" )
    private String contactsTel;

    @ApiModelProperty ( "主要负责人备注" )
    @TableField ( "contacts_remarks" )
    private String contactsRemarks;

    @ApiModelProperty ( "客户状态类型，1：商机录入还未分配具体业务部门；2：普通客户，由商机转为具体业务部门，待签约；3：已签约确定客户；4：公海客户" )
    @TableField ( "type" )
    private Integer type;

    @ApiModelProperty ( "商机提供人Id" )
    @TableField ( "provide_name" )
    private String provideName;

    @ApiModelProperty ( "商机提供人电话" )
    @TableField ( "provide_phone" )
    private String providePhone;

    @ApiModelProperty ( "业务员id" )
    @TableField ( "sale_user_id" )
    private String saleUserId;

    @ApiModelProperty ( "商机/客户录入人Id" )
    @TableField ( "create_id" )
    private String createId;

    @ApiModelProperty ( "创建时间" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    @TableField ( "create_time" )
    private Date createTime;

    @ApiModelProperty ( "更新时间" )
    @TableField ( "change_time" )
    private Date changeTime;

    @ApiModelProperty ( "是否禁用" )
    @TableField ( "is_used" )
    private Integer isUsed;

    @ApiModelProperty ( "收票邮箱" )
    @TableField ( "receiving_email" )
    private String receivingEmail;

    @ApiModelProperty ( "附件名称" )
    @TableField ( exist = false )
    private List<String> FileNames;

    @ApiModelProperty ( "附件id" )
    @TableField ( exist = false )
    private List<String> FileIds;


    @ApiModelProperty ( "流程实例id" )
    @TableField ( "instance_id" )
    private String instanceId;

    @ApiModelProperty ( "流程状态" )
    @TableField ( "state" )
    private String state;

    @ApiModelProperty ( "业务type" )
    @TableField ( exist = false )
    private String businessType;

    @ApiModelProperty ( "流程模型id" )
    @TableField ( exist = false )
    private String modelId;

    @ApiModelProperty ( "是否禁用；1：是；2：否" )
    @TableField ( "is_disabled" )
    @Excel ( name = "是否禁用" )
    private String isDisabled;

    @TableField ( "is_send" )
    private Integer isSend;


    @ApiModelProperty ( value = "客户联系人信息" )
    @TableField ( exist = false )
    private List<ContactsEntity> contactsEntities;

    @ApiModelProperty ( value = "银行信息" )
    @TableField ( exist = false )
    private List<BankEntity> bankEntities;

    @ApiModelProperty ( value = "地址信息" )
    @TableField ( exist = false )
    private List<ErpAddress> addressEntities;

    @ApiModelProperty ( value = "商务信息" )
    @TableField ( exist = false )
    private ErpBusinessInformation businessInformationEntities;

    @ApiModelProperty ( value = "省名称" )
    @TableField ( exist = false )
    private String provincesName;

    @ApiModelProperty ( value = "市名称" )
    @TableField ( exist = false )
    private String cityName;

    @ApiModelProperty ( value = "县名称" )
    @TableField ( exist = false )
    private String countyName;

    @ApiModelProperty ( value = "组织名称" )
    @TableField ( exist = false )
    private String deptName;

    @ApiModelProperty ( value = "对应供应商名称" )
    @TableField ( exist = false )
    private String counterSupplierName;

    @ApiModelProperty ( value = "对应客户名称" )
    @TableField ( exist = false )
    private String counterCustomerName;

}
